<?php
class Listing_Form_AddNewCommentForm extends Ac_Form
{		
	public function init()
	{
		parent::init();
		$view = Zend_Registry::get('Zend_View');
		$this->setAction($view->url());
		$this->setAttrib('id','listing_form');
		$this->addElement('textarea', 'add_comments', array(
            'id'         => 'add_comments',
            'name'       => 'add_comments',
			'cols'		 => 65,
			'rows'		 => 12,
            'validators' => array(
                array('NotEmpty', true, array('messages' => '此信息是必需填写')),
            ),
            'decorators' => array(
                            'ViewHelper',
                            'Errors',                            
                            array('Label', array('placement' => 'prepend')),
                            array(array('row' => 'HtmlTag'), array('tag' => 'div', 'class' => 'add_comments text', 'style'=>'padding-left:77px')),
            ),
            'disableLoadDefaultDecorators' => true,
            'required'   => true,
            'label'      => '添加评论',
        ));
        
        $this->addElement('button', 'register', array(
        	'id'		  => 'add_comment_submit',
            'required'    => false,
            'ignore'      => true,
            'type'        => 'button',
            'label'       => '添加评论',
            'decorators' => array(
                            'ViewHelper',
                            'Errors',
                            array('Description', array('escape' => false, 'placement' => 'APPEND')),
                            array(array('row' => 'HtmlTag'), array('tag' => 'div', 'class' => 'button em')),
            ),
        ));
        
	}
}